<?php
/**
 * Controller is the customized base controller class.
 * All controller classes for this application should extend from this base class.
 */
class Controller extends CController
{
	public $layout='main';
	public $_userModel;
	public $_userProfileModel;

	public function init()
	{
		$_userId = Yii::app()->user->getId();
		if(isset($_userId))
		{
			$this->_userModel = Users::model()->findByPk($_userId);
			$this->_userProfileModel = Profile::model()->findByPk($_userId);
		}
	}
	
}